package com.taa.feign;

import com.taa.dao.po.DishInfo;
import com.taa.dto.DishStockDTO;
import com.taa.response.Response;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @Author: taa
 * @Desc: restaurant-service FeignClient
 * @Create: 2025-06-22 17:25
 **/
@FeignClient(name = "elm-restaurant-service")
public interface RestaurantFeignClient {
    
    @GetMapping("/restaurant/dish/list-by-ids")
    Response<List<DishInfo>> getDishListByIds(@RequestParam("ids") List<Long> ids);
    
    @PostMapping("/restaurant/dish/decrease-stock")
    Response<Void> decreaseStock(@RequestBody List<DishStockDTO> dishStockList);
    
}

